from abc import ABCMeta,abstractmethod,abstractproperty
class AssistApi(metaclass = ABCMeta):
    IDLE      = 0   # 空闲
    ONGOING   = 1   # 正在进行
    COMPLETED = 2   # 已经完成
    INTERRUPT = 3   # 中断

    def __init__(self, operation_identification):
        self.name = "AssistBase"
        self.status = self.IDLE
        self.operation_identification = operation_identification
        self.error_string = "no error happend!"


    @abstractmethod
    def begin(self):
        """
        开始执行某个动作
        """
        pass

    @abstractmethod
    def end(self):
        """
        强制结束某个动作
        """
        pass

    @abstractmethod
    def get_current_status(self):
        """
        获取当前动作的执行状态
        """
        pass

    @abstractmethod
    def get_last_error_info_string(self):
        """
        获取当前错误发生的原因信息
        """
        pass


